<?php /*a:1:{s:50:"D:\projects\junhe\app\index\view\member\login.html";i:1740138395;}*/ ?>
<html lang="zh-CN">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no,mail=yes">

	<title><?php if(isset($article['title'])): ?><?php echo htmlentities($article['title'],ENT_QUOTES); ?> - <?php endif; if(isset($catInfo['title'])): ?><?php echo htmlentities($catInfo['title'],ENT_QUOTES); ?> -
		<?php endif; ?><?php echo htmlentities($config['name'],ENT_QUOTES); ?></title>
	<meta name="keywords"
		content="<?php if(isset($article['keywords'])): ?><?php echo htmlentities($article['keywords'],ENT_QUOTES); elseif(isset($catInfo['keywords'])): ?><?php echo htmlentities($catInfo['keywords'],ENT_QUOTES); else: ?><?php echo htmlentities($config['keyword'],ENT_QUOTES); ?><?php endif; ?>">
	<meta name="description"
		content="<?php if(isset($article['subtitle'])): ?><?php echo htmlentities($article['subtitle'],ENT_QUOTES); elseif(isset($catInfo['desc_text'])): ?><?php echo htmlentities($catInfo['desc_text'],ENT_QUOTES); else: ?><?php echo htmlentities($config['content'],ENT_QUOTES); ?><?php endif; ?>">
	<link rel="shortcut icon" href="<?php echo htmlentities($config['site_icon'],ENT_QUOTES); ?>" type="image/x-icon">
	<script src="/public/home/js/jquery-1.8.3.min.js"></script>
	<link rel="stylesheet" href="/public/home/layui/css/layui.css">
	<link rel="stylesheet" href="/public/home/css/common.css">
	<link rel="stylesheet" href="/public/home/css/hover.css">
	<link rel="stylesheet" href="/public/home/css/index.css">
	
	<script type="text/javascript" src="/public/home/layui/layui.js"></script>
	<link rel="stylesheet" href="/public/home/css/swiper-bundle.css" />
	<script src="/public/home/js/scrollReveal.js" type="text/javascript"></script>

</head>
<!-- 中间区域 -->
<main class="login-main">
	<div class="layui-main">
	    <div class="d-flex al-c jc-s mb60 flex-wrap">
	        <a href="/">
	            <img src="<?php echo htmlentities($config['pic'],ENT_QUOTES); ?>">
	        </a>
	        <ul class="d-flex al-c jc-c gap35 flex-wrap mt20-xs" id="tabHeader">
            	<li class="item layui-this">
                账号注册
            	</li>
            	<li class="item">
            	    已有账号登录
            	</li>
            
            </ul>
	    </div>
	   <div id="tabBody">
	       <form class="layui-tab-item  layui-form layui-show register-box" autocomplete="off" onsubmit="return false">
	          <ul >
                <li >
                    <img src="/public/home/images/account.png">
                    <input class="layui-input" name="username" readonly onfocus="this.removeAttribute('readonly');" autocomplete="off" lay-reqtext="请填写账号" lay-verify="required" placeholder="请输入账户名">
                </li>
                 <li >
                    <img src="/public/home/images/msg.png">
                    <input class="layui-input" name="nickname"  readonly onfocus="this.removeAttribute('readonly');" autocomplete="off"  lay-reqtext="请填写昵称" lay-verify="required"  placeholder="请输入您的称呼">
                </li>
                 <li >
                    <img src="/public/home/images/phone.png">
                    <input class="layui-input" name="phone"  readonly onfocus="this.removeAttribute('readonly');"  autocomplete="off"  lay-reqtext="请填写手机号" lay-verify="required|phone"  placeholder="请输入您的手机号">
                </li>
                 <li >
                    <img src="/public/home/images/emai-gary.png">
                    <input class="layui-input" name="email" readonly onfocus="this.removeAttribute('readonly');" autocomplete="off" lay-reqtext="请填写邮箱" lay-verify="required|email" placeholder="请输入您的电子邮箱">
                </li>
                 <li >
                    <img src="/public/home/images/password.png">
                    <input type="password" class="layui-input" autocomplete="off" name="password" lay-reqtext="请填写登录密码"  lay-verify="required" placeholder="请输入您的密码">
                </li>
                 <li >
                    <img src="/public/home/images/code.png">
                    <input class="layui-input" placeholder="请输入验证码">
                     <img src="https://www.oschina.net/action/user/captcha" onclick="this.src='https://www.oschina.net/action/user/captcha?t='+ new Date().getTime();">
                </li>
            </ul>
            <div class="login-btn mt68">
                <button class="layui-btn"  lay-filter="register" lay-submit >立即注册</button>
            </div>
	           
	           
	       </form>
	       <form class="layui-tab-item login-box layui-form"  onsubmit="return false;" id="logForm">
	        <ul>
                <li >
                    <img src="/public/home/images/account.png">
                    <input	id="login_username" name="username"  lay-verify="required" class="layui-input" placeholder="请输入账户名">
                </li>
                 <li >
                    <img src="/public/home/images/password.png">
                    <input 	id="login_password" name="password" lay-verify="required" type="password" class="layui-input"  placeholder="请输入您的密码">
                </li>
            </ul>
            <div class="login-btn mt68">
                <button lay-filter="login"  lay-submit class="layui-btn">立即登录</button>
            </div>
	       </form>
	   </div>
		
	</div>
</main>
<!-- 中间区域结束 -->
<script src="/public/home/js/index.js"></script>
<script src="/public/static/common.js"></script>
<script src="/public/static/index.js"></script>
<script>
	$(function () {
		layui.use(function () {
			var element = layui.element;
			var form    = layui.form
			// 绑定自定义的 tab 元素
			element.tab({
				headerElem: '#tabHeader .item',
				bodyElem: '#tabBody>form'
			});
			form.on('submit(register)', function(data){
				var field = data.field; // 获取表单字段值
				// 此处可执行 Ajax 等操作
				ajaxRequest('/register', field, 'POST', this, function (response) {
                layer.msg('注册成功', {icon: 1, time: 2000}, function() {
                    // 弹窗消失后跳转
						window.location.href = '/member'; // 替换为目标页面的 URL
					});
				});
				return false; // 阻止默认 form 跳转
			});
			form.on('submit(login)', function(data){
				var field = data.field; // 获取表单字段值
				// 此处可执行 Ajax 等操作
				ajaxRequest('/login', field, 'POST', this, function (response) {
                layer.msg('登录成功', {icon: 1, time: 2000}, function() {
                    // 弹窗消失后跳转
						window.location.href = '/member'; // 替换为目标页面的 URL
					});
				});
				return false; // 阻止默认 form 跳转
			});
		});
		
	
	})
    	
		
</script>
